package com.liumin.demo.comlink.base;

/**
 * 描述：请求返回信息，包含请求SQL，是否成功，请求结果、错误内容等信息
 * 时间：2024/11/4 10:31
 * 作者:  Liumin
 */
public class BaseResponse<T> {

    /**
     * 状态码
     */
    private String code;

    /**
     * 返回信息
     */
    private String msg;

    /**
     * 分页页码
     */
    private String pageNumber;
    /**
     * 返回数据总数量
     */
    private int total;
    /**
     * 返回数据  若正常和异常返回数据格式不一样，用自定义的
     */
//    private T rows;


    public BaseResponse(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public BaseResponse(String code, String msg, String pageNumber, int total, T rows) {
        this.code = code;
        this.msg = msg;
        this.pageNumber = pageNumber;
        this.total = total;
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(String pageNumber) {
        this.pageNumber = pageNumber;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

}
